<?phpnamespace app\common\model;class TestCategory extends BaseModel{    protected $table = 'test_category';    static function getListTree()    {        $list = self::select()->toArray();        return list_to_html($list);    }    static function selectOptions()    {        $list = self::getListTree();        $res = [];        foreach ($list as $v) {            $res[$v['id']] = $v['_html'].$v['name'];        }        return $res;    }}